#ifndef __GAME_H__
#define __GAME_H__

#include <vector>
#include "Observer.h"
#include "Object.h"
#include "Terrain.h"
#include "Turret.h"
#include "Screen.h"
#include "ViewFactory.h"
#include "Model.h"
#include "Missile.h"
#include "ObjectStrategy.h"

class Game : public Observer
{
private:
	bool onGame;
	std::vector<Object*> object_list;
	int pass_missile_num;
	Terrain* map;
	Turret* player;
	Screen* scr;
	VIEWS view;
	std::vector<Model*> model_list;
	Missile* temp;
public:
	Game();
	void GameStart();
	void GameEnd();
	void changeView(VIEWS _view);
	void Shoot();
	void Loading();
	void addObject(Object* obj);
	void rotate(int rotate_theta, int lift);
	virtual void Update();
	void Draw();
	bool is_game() { return onGame; }
	void DrawAllObject();
	void clearObjList();
	Model* get_ith_model(int i)
	{
		return model_list[i];
	}
	void Moving()
	{
		for(int i = 0 ; i < object_list.size() ; i++)
		{
			MovingStrategy::moving(object_list[i]);
		}
	}
};

#endif